package com.chentf.nio.c3;

import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;

/**
 * @author chentengfei
 * @desc 多路复用select客户端
 * @date 2022-05-07 20:37:03
 */
public class SelectClient02 {
    public static void main(String[] args) {
        try (Socket socket = new Socket("localhost",8080)){
            System.out.println(socket);
            socket.getOutputStream().write("world".getBytes());
            System.in.read();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
